package com.mdd;

import com.mdd.Config.SpringConfig;
import com.mdd.dao.BookDao;
import com.mdd.domain.Brand;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.sql.DataSource;
import java.util.List;


public class App {
    public static void main(String[] args) {
        ApplicationContext act = new AnnotationConfigApplicationContext(SpringConfig.class);
        BookDao bookDao = act.getBean(BookDao.class);
        List<Brand> all = bookDao.findAll();
        System.out.println(all);
    }
}
